home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1992-04-08 | 7.8 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Wed Apr 8 17:59:09 1992, modified Wed Apr 8 17:59:09 1992, creator Think C, type ASCII, 7290 bytes "Menus.c" , at 0x1cfa 440 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| dearkID
| deark: macbinary
| default
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 4d 65 6e 75 73 2e | 63 00 00 00 00 00 00 00 |..Menus.|c.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 1c 7a 00 | 00 01 b8 a6 09 1d 2d a6 |......z.|......-.|
|00000060| 09 1d 2d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..-.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6a cd 00 00 |........|....j...|
|00000080| 2f 2a 20 46 69 6c 65 3a | 20 4d 65 6e 75 73 2e 63 |/* File:| Menus.c|
|00000090| 20 2a 2f 0d 0d 23 69 6e | 63 6c 75 64 65 20 3c 41 | */..#in|clude <A|
|000000a0| 70 70 6c 65 45 76 65 6e | 74 73 2e 68 3e 0d 23 69 |ppleEven|ts.h>.#i|
|000000b0| 6e 63 6c 75 64 65 20 22 | 41 45 52 65 67 69 73 74 |nclude "|AERegist|
|000000c0| 72 79 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |ry.h".#i|nclude "|
|000000d0| 41 45 4f 62 6a 65 63 74 | 73 2e 68 22 0d 23 69 6e |AEObject|s.h".#in|
|000000e0| 63 6c 75 64 65 20 22 41 | 45 50 61 63 6b 4f 62 6a |clude "A|EPackObj|
|000000f0| 65 63 74 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |ect.h".#|include |
|00000100| 22 53 63 72 69 70 74 53 | 63 72 61 70 2e 68 22 0d |"ScriptS|crap.h".|
|00000110| 23 69 6e 63 6c 75 64 65 | 20 22 50 72 6f 74 6f 74 |#include| "Protot|
|00000120| 79 70 65 73 2e 68 22 0d | 0d 0d 0d 76 6f 69 64 20 |ypes.h".|...void |
|00000130| 53 65 74 49 74 65 6d 45 | 6e 61 62 6c 65 20 28 4d |SetItemE|nable (M|
|00000140| 65 6e 75 48 61 6e 64 6c | 65 20 74 68 65 4d 65 6e |enuHandl|e theMen|
|00000150| 75 2c 20 73 68 6f 72 74 | 20 74 68 65 49 74 65 6d |u, short| theItem|
|00000160| 2c 20 42 6f 6f 6c 65 61 | 6e 20 65 6e 61 62 6c 65 |, Boolea|n enable|
|00000170| 64 29 0d 7b 0d 09 69 66 | 20 28 65 6e 61 62 6c 65 |d).{..if| (enable|
|00000180| 64 29 0d 09 09 45 6e 61 | 62 6c 65 49 74 65 6d 28 |d)...Ena|bleItem(|
|00000190| 74 68 65 4d 65 6e 75 2c | 20 74 68 65 49 74 65 6d |theMenu,| theItem|
|000001a0| 29 3b 0d 09 65 6c 73 65 | 0d 09 09 44 69 73 61 62 |);..else|...Disab|
|000001b0| 6c 65 49 74 65 6d 28 74 | 68 65 4d 65 6e 75 2c 20 |leItem(t|heMenu, |
|000001c0| 74 68 65 49 74 65 6d 29 | 3b 0d 7d 20 2f 2a 20 53 |theItem)|;.} /* S|
|000001d0| 65 74 49 74 65 6d 45 6e | 61 62 6c 65 20 2a 2f 0d |etItemEn|able */.|
|000001e0| 0d 0d 76 6f 69 64 20 45 | 6e 61 62 6c 65 46 69 6c |..void E|nableFil|
|000001f0| 65 43 6f 6d 6d 61 6e 64 | 73 20 28 29 0d 7b 0d 09 |eCommand|s ().{..|
|00000200| 4d 65 6e 75 48 61 6e 64 | 6c 65 09 66 69 6c 65 4d |MenuHand|le.fileM|
|00000210| 65 6e 75 20 3d 20 47 65 | 74 4d 48 61 6e 64 6c 65 |enu = Ge|tMHandle|
|00000220| 28 6b 46 69 6c 65 4d 65 | 6e 75 29 3b 0d 09 57 69 |(kFileMe|nu);..Wi|
|00000230| 6e 64 6f 77 50 74 72 09 | 69 6e 46 72 6f 6e 74 20 |ndowPtr.|inFront |
|00000240| 3d 20 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 3b |= FrontW|indow();|
|00000250| 0d 0d 09 45 6e 61 62 6c | 65 49 74 65 6d 20 28 66 |...Enabl|eItem (f|
|00000260| 69 6c 65 4d 65 6e 75 2c | 20 63 4e 65 77 29 3b 0d |ileMenu,| cNew);.|
|00000270| 09 45 6e 61 62 6c 65 49 | 74 65 6d 20 28 66 69 6c |.EnableI|tem (fil|
|00000280| 65 4d 65 6e 75 2c 20 63 | 4f 70 65 6e 29 3b 0d 09 |eMenu, c|Open);..|
|00000290| 53 65 74 49 74 65 6d 45 | 6e 61 62 6c 65 28 66 69 |SetItemE|nable(fi|
|000002a0| 6c 65 4d 65 6e 75 2c 20 | 63 43 6c 6f 73 65 2c 20 |leMenu, |cClose, |
|000002b0| 28 69 6e 46 72 6f 6e 74 | 20 21 3d 20 4e 55 4c 4c |(inFront| != NULL|
|000002c0| 29 20 26 26 20 28 28 28 | 57 69 6e 64 6f 77 50 65 |) && (((|WindowPe|
|000002d0| 65 6b 29 69 6e 46 72 6f | 6e 74 29 2d 3e 67 6f 41 |ek)inFro|nt)->goA|
|000002e0| 77 61 79 46 6c 61 67 29 | 29 3b 0d 7d 20 2f 2a 20 |wayFlag)|);.} /* |
|000002f0| 45 6e 61 62 6c 65 46 69 | 6c 65 43 6f 6d 6d 61 6e |EnableFi|leComman|
|00000300| 64 73 20 2a 2f 0d 0d 0d | 76 6f 69 64 20 41 64 6a |ds */...|void Adj|
|00000310| 75 73 74 4d 65 6e 75 73 | 28 76 6f 69 64 29 0d 7b |ustMenus|(void).{|
|00000320| 0d 09 57 69 6e 64 6f 77 | 50 74 72 09 69 6e 46 72 |..Window|Ptr.inFr|
|00000330| 6f 6e 74 20 3d 20 46 72 | 6f 6e 74 57 69 6e 64 6f |ont = Fr|ontWindo|
|00000340| 77 28 29 3b 0d 09 42 6f | 6f 6c 65 61 6e 09 09 69 |w();..Bo|olean..i|
|00000350| 73 41 55 73 65 72 57 69 | 6e 64 6f 77 2c 20 69 73 |sAUserWi|ndow, is|
|00000360| 44 65 73 6b 41 63 63 3b | 0d 0d 09 45 6e 61 62 6c |DeskAcc;|...Enabl|
|00000370| 65 46 69 6c 65 43 6f 6d | 6d 61 6e 64 73 28 29 3b |eFileCom|mands();|
|00000380| 0d 09 44 69 73 61 62 6c | 65 49 74 65 6d 28 47 65 |..Disabl|eItem(Ge|
|00000390| 74 4d 48 61 6e 64 6c 65 | 28 6b 45 64 69 74 4d 65 |tMHandle|(kEditMe|
|000003a0| 6e 75 29 2c 20 30 29 3b | 0d 09 69 66 20 28 28 69 |nu), 0);|..if ((i|
|000003b0| 6e 46 72 6f 6e 74 29 20 | 26 26 20 28 28 28 57 69 |nFront) |&& (((Wi|
|000003c0| 6e 64 6f 77 50 65 65 6b | 29 69 6e 46 72 6f 6e 74 |ndowPeek|)inFront|
|000003d0| 29 2d 3e 77 69 6e 64 6f | 77 4b 69 6e 64 20 3c 20 |)->windo|wKind < |
|000003e0| 30 29 29 0d 09 09 45 6e | 61 62 6c 65 49 74 65 6d |0))...En|ableItem|
|000003f0| 28 47 65 74 4d 48 61 6e | 64 6c 65 28 6b 45 64 69 |(GetMHan|dle(kEdi|
|00000400| 74 4d 65 6e 75 29 2c 20 | 30 29 3b 0d 09 65 6c 73 |tMenu), |0);..els|
|00000410| 65 0d 09 09 44 69 73 61 | 62 6c 65 49 74 65 6d 28 |e...Disa|bleItem(|
|00000420| 47 65 74 4d 48 61 6e 64 | 6c 65 28 6b 45 64 69 74 |GetMHand|le(kEdit|
|00000430| 4d 65 6e 75 29 2c 20 30 | 29 3b 0d 7d 20 2f 2a 20 |Menu), 0|);.} /* |
|00000440| 41 64 6a 75 73 74 4d 65 | 6e 75 73 20 2a 2f 0d 0d |AdjustMe|nus */..|
|00000450| 0d 0d 76 6f 69 64 20 44 | 6f 41 70 70 6c 65 43 6d |..void D|oAppleCm|
|00000460| 64 73 20 28 73 68 6f 72 | 74 20 74 68 65 49 74 65 |ds (shor|t theIte|
|00000470| 6d 29 0d 7b 0d 09 53 74 | 72 32 35 35 09 09 6e 61 |m).{..St|r255..na|
|00000480| 6d 65 3b 09 09 09 2f 2a | 20 73 74 72 69 6e 67 20 |me;.../*| string |
|00000490| 66 6f 72 20 44 41 20 6e | 61 6d 65 09 2a 2f 0d 0d |for DA n|ame.*/..|
|000004a0| 09 73 77 69 74 63 68 20 | 28 74 68 65 49 74 65 6d |.switch |(theItem|
|000004b0| 29 20 7b 0d 0d 09 09 63 | 61 73 65 20 63 41 62 6f |) {....c|ase cAbo|
|000004c0| 75 74 3a 20 0d 09 09 09 | 41 6c 65 72 74 28 6b 41 |ut: ....|Alert(kA|
|000004d0| 62 6f 75 74 44 69 61 6c | 6f 67 2c 20 4e 55 4c 4c |boutDial|og, NULL|
|000004e0| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |);....br|eak;....|
|000004f0| 0d 09 09 64 65 66 61 75 | 6c 74 3a 0d 09 09 09 47 |...defau|lt:....G|
|00000500| 65 74 49 74 65 6d 28 47 | 65 74 4d 48 61 6e 64 6c |etItem(G|etMHandl|
|00000510| 65 28 6b 41 70 70 6c 65 | 4d 65 6e 75 29 2c 20 74 |e(kApple|Menu), t|
|00000520| 68 65 49 74 65 6d 2c 20 | 28 53 74 72 69 6e 67 50 |heItem, |(StringP|
|00000530| 74 72 29 26 6e 61 6d 65 | 29 3b 0d 09 09 09 4f 70 |tr)&name|);....Op|
|00000540| 65 6e 44 65 73 6b 41 63 | 63 28 28 53 74 72 69 6e |enDeskAc|c((Strin|
|00000550| 67 50 74 72 29 26 6e 61 | 6d 65 29 3b 0d 09 7d 0d |gPtr)&na|me);..}.|
|00000560| 7d 0d 0d 0d 76 6f 69 64 | 20 44 6f 46 69 6c 65 43 |}...void| DoFileC|
|00000570| 6d 64 73 20 28 73 68 6f | 72 74 20 74 68 65 49 74 |mds (sho|rt theIt|
|00000580| 65 6d 29 0d 7b 0d 09 6c | 6f 6e 67 09 09 72 65 73 |em).{..l|ong..res|
|00000590| 75 6c 74 20 3d 20 30 3b | 0d 09 46 53 53 70 65 63 |ult = 0;|..FSSpec|
|000005a0| 09 09 74 68 65 46 69 6c | 65 3b 0d 09 53 46 54 79 |..theFil|e;..SFTy|
|000005b0| 70 65 4c 69 73 74 20 09 | 74 79 70 65 4c 69 73 74 |peList .|typeList|
|000005c0| 20 3d 20 7b 27 73 63 62 | 6b 27 2c 20 27 20 20 20 | = {'scb|k', ' |
|000005d0| 20 27 2c 20 27 20 20 20 | 20 27 2c 20 27 20 20 20 | ', ' | ', ' |
|000005e0| 20 27 7d 3b 0d 09 53 74 | 61 6e 64 61 72 64 46 69 | '};..St|andardFi|
|000005f0| 6c 65 52 65 70 6c 79 20 | 09 72 65 70 6c 79 3b 0d |leReply |.reply;.|
|00000600| 09 4f 53 45 72 72 09 09 | 65 72 72 3b 0d 09 0d 09 |.OSErr..|err;....|
|00000610| 73 77 69 74 63 68 20 28 | 74 68 65 49 74 65 6d 29 |switch (|theItem)|
|00000620| 20 7b 0d 0d 09 09 63 61 | 73 65 20 63 4e 65 77 3a | {....ca|se cNew:|
|00000630| 20 0d 09 09 09 61 65 5f | 64 6f 5f 4e 65 77 44 6f | ....ae_|do_NewDo|
|00000640| 63 75 6d 65 6e 74 28 29 | 3b 0d 09 09 62 72 65 61 |cument()|;...brea|
|00000650| 6b 3b 0d 09 09 0d 09 09 | 63 61 73 65 20 63 4f 70 |k;......|case cOp|
|00000660| 65 6e 3a 20 0d 09 09 09 | 53 74 61 6e 64 61 72 64 |en: ....|Standard|
|00000670| 47 65 74 46 69 6c 65 28 | 4e 55 4c 4c 2c 20 31 2c |GetFile(|NULL, 1,|
|00000680| 20 74 79 70 65 4c 69 73 | 74 2c 20 26 72 65 70 6c | typeLis|t, &repl|
|00000690| 79 29 3b 0d 09 09 09 69 | 66 20 28 72 65 70 6c 79 |y);....i|f (reply|
|000006a0| 2e 73 66 47 6f 6f 64 29 | 0d 09 09 09 09 61 65 5f |.sfGood)|.....ae_|
|000006b0| 64 6f 5f 4f 70 65 6e 28 | 26 72 65 70 6c 79 2e 73 |do_Open(|&reply.s|
|000006c0| 66 46 69 6c 65 29 3b 0d | 09 09 62 72 65 61 6b 3b |fFile);.|..break;|
|000006d0| 0d 09 09 09 09 0d 09 09 | 63 61 73 65 20 63 43 6c |........|case cCl|
|000006e0| 6f 73 65 3a 20 0d 09 09 | 09 61 65 5f 64 6f 5f 43 |ose: ...|.ae_do_C|
|000006f0| 6c 6f 73 65 28 29 3b 0d | 09 09 62 72 65 61 6b 3b |lose();.|..break;|
|00000700| 0d 0d 09 09 63 61 73 65 | 20 63 51 75 69 74 3a 20 |....case| cQuit: |
|00000710| 0d 09 09 09 61 65 5f 64 | 6f 5f 51 75 69 74 28 29 |....ae_d|o_Quit()|
|00000720| 3b 0d 09 7d 0d 7d 20 2f | 2a 20 44 6f 46 69 6c 65 |;..}.} /|* DoFile|
|00000730| 43 6d 64 73 20 2a 2f 0d | 0d 0d 76 6f 69 64 20 44 |Cmds */.|..void D|
|00000740| 69 73 70 61 74 63 68 20 | 28 6c 6f 6e 67 20 6d 65 |ispatch |(long me|
|00000750| 6e 75 52 65 73 75 6c 74 | 29 0d 7b 0d 09 73 68 6f |nuResult|).{..sho|
|00000760| 72 74 20 09 74 68 65 4d | 65 6e 75 20 3d 20 28 6d |rt .theM|enu = (m|
|00000770| 65 6e 75 52 65 73 75 6c | 74 20 3e 3e 20 31 36 29 |enuResul|t >> 16)|
|00000780| 3b 09 09 09 09 09 2f 2a | 20 6d 65 6e 75 20 73 65 |;...../*| menu se|
|00000790| 6c 65 63 74 65 64 09 2a | 2f 0d 09 73 68 6f 72 74 |lected.*|/..short|
|000007a0| 20 09 74 68 65 49 74 65 | 6d 20 3d 20 28 6d 65 6e | .theIte|m = (men|
|000007b0| 75 52 65 73 75 6c 74 20 | 26 20 30 78 30 30 30 30 |uResult |& 0x0000|
|000007c0| 46 46 46 46 29 3b 20 20 | 20 20 20 20 20 09 09 2f |FFFF); | ../|
|000007d0| 2a 20 69 74 65 6d 20 73 | 65 6c 65 63 74 65 64 09 |* item s|elected.|
|000007e0| 2a 2f 0d 0d 09 73 77 69 | 74 63 68 20 28 74 68 65 |*/...swi|tch (the|
|000007f0| 4d 65 6e 75 29 20 7b 0d | 0d 09 09 63 61 73 65 20 |Menu) {.|...case |
|00000800| 6b 41 70 70 6c 65 4d 65 | 6e 75 3a 20 0d 09 09 09 |kAppleMe|nu: ....|
|00000810| 44 6f 41 70 70 6c 65 43 | 6d 64 73 28 74 68 65 49 |DoAppleC|mds(theI|
|00000820| 74 65 6d 29 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d |tem);...|.break;.|
|00000830| 09 09 09 0d 09 09 63 61 | 73 65 20 6b 46 69 6c 65 |......ca|se kFile|
|00000840| 4d 65 6e 75 3a 20 0d 09 | 09 09 44 6f 46 69 6c 65 |Menu: ..|..DoFile|
|00000850| 43 6d 64 73 28 74 68 65 | 49 74 65 6d 29 3b 0d 09 |Cmds(the|Item);..|
|00000860| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 0d 09 09 63 |..break;|.......c|
|00000870| 61 73 65 20 6b 45 64 69 | 74 4d 65 6e 75 3a 20 0d |ase kEdi|tMenu: .|
|00000880| 09 09 09 53 79 73 74 65 | 6d 45 64 69 74 28 74 68 |...Syste|mEdit(th|
|00000890| 65 49 74 65 6d 20 2d 20 | 31 29 3b 0d 09 09 09 62 |eItem - |1);....b|
|000008a0| 72 65 61 6b 3b 0d 09 7d | 0d 09 48 69 6c 69 74 65 |reak;..}|..Hilite|
|000008b0| 4d 65 6e 75 28 30 29 3b | 09 20 20 20 09 09 2f 2a |Menu(0);|. ../*|
|000008c0| 20 75 6e 2d 68 69 6c 69 | 74 65 20 73 65 6c 65 63 | un-hili|te selec|
|000008d0| 74 65 64 20 6d 65 6e 75 | 20 2a 2f 0d 7d 0d 0d 0d |ted menu| */.}...|
|000008e0| 76 6f 69 64 20 61 65 5f | 64 6f 5f 51 75 69 74 20 |void ae_|do_Quit |
|000008f0| 28 76 6f 69 64 29 0d 7b | 0d 09 2f 2a 20 43 6f 6e |(void).{|../* Con|
|00000900| 73 74 72 75 63 74 20 61 | 6e 20 41 70 70 6c 65 20 |struct a|n Apple |
|00000910| 65 76 65 6e 74 20 74 6f | 20 71 75 69 74 20 74 68 |event to| quit th|
|00000920| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 2a 2f |e applic|ation */|
|00000930| 0d 0d 09 4f 53 45 72 72 | 09 09 09 65 72 72 20 3d |...OSErr|...err =|
|00000940| 20 6e 6f 45 72 72 3b 0d | 09 41 70 70 6c 65 45 76 | noErr;.|.AppleEv|
|00000950| 65 6e 74 09 09 61 6e 41 | 70 70 6c 65 45 76 65 6e |ent..anA|ppleEven|
|00000960| 74 2c 20 72 65 70 6c 79 | 41 45 3b 0d 09 44 65 73 |t, reply|AE;..Des|
|00000970| 63 54 79 70 65 09 09 73 | 61 76 65 4f 70 74 69 6f |cType..s|aveOptio|
|00000980| 6e 3b 0d 09 0d 09 65 72 | 72 20 3d 20 41 45 43 72 |n;....er|r = AECr|
|00000990| 65 61 74 65 41 70 70 6c | 65 45 76 65 6e 74 28 6b |eateAppl|eEvent(k|
|000009a0| 43 6f 72 65 45 76 65 6e | 74 43 6c 61 73 73 2c 20 |CoreEven|tClass, |
|000009b0| 6b 41 45 51 75 69 74 41 | 70 70 6c 69 63 61 74 69 |kAEQuitA|pplicati|
|000009c0| 6f 6e 2c 20 26 67 53 65 | 6c 66 41 64 64 72 65 73 |on, &gSe|lfAddres|
|000009d0| 73 44 65 73 63 2c 0d 09 | 09 09 09 09 09 09 20 6b |sDesc,..|...... k|
|000009e0| 41 75 74 6f 47 65 6e 65 | 72 61 74 65 52 65 74 75 |AutoGene|rateRetu|
|000009f0| 72 6e 49 44 2c 20 6b 41 | 6e 79 54 72 61 6e 73 61 |rnID, kA|nyTransa|
|00000a00| 63 74 69 6f 6e 49 44 2c | 0d 09 09 09 09 09 09 09 |ctionID,|........|
|00000a10| 20 26 61 6e 41 70 70 6c | 65 45 76 65 6e 74 29 3b | &anAppl|eEvent);|
|00000a20| 0d 09 69 66 20 28 65 72 | 72 20 3d 3d 20 6e 6f 45 |..if (er|r == noE|
|00000a30| 72 72 29 20 7b 0d 09 09 | 2f 2a 20 53 65 6e 64 20 |rr) {...|/* Send |
|00000a40| 74 68 65 20 65 76 65 6e | 74 20 74 6f 20 6f 75 72 |the even|t to our|
|00000a50| 73 65 6c 76 65 73 20 2a | 2f 0d 09 09 65 72 72 20 |selves *|/...err |
|00000a60| 3d 20 41 45 53 65 6e 64 | 20 28 26 61 6e 41 70 70 |= AESend| (&anApp|
|00000a70| 6c 65 45 76 65 6e 74 2c | 20 26 72 65 70 6c 79 41 |leEvent,| &replyA|
|00000a80| 45 2c 20 6b 41 45 4e 6f | 52 65 70 6c 79 20 2b 20 |E, kAENo|Reply + |
|00000a90| 6b 41 45 43 61 6e 49 6e | 74 65 72 61 63 74 2c 0d |kAECanIn|teract,.|
|00000aa0| 09 09 09 09 09 20 20 6b | 41 45 4e 6f 72 6d 61 6c |..... k|AENormal|
|00000ab0| 50 72 69 6f 72 69 74 79 | 2c 20 6b 41 45 44 65 66 |Priority|, kAEDef|
|00000ac0| 61 75 6c 74 54 69 6d 65 | 6f 75 74 2c 20 28 49 64 |aultTime|out, (Id|
|00000ad0| 6c 65 50 72 6f 63 50 74 | 72 29 30 4c 2c 0d 09 09 |leProcPt|r)0L,...|
|00000ae0| 09 09 09 20 20 28 45 76 | 65 6e 74 46 69 6c 74 65 |... (Ev|entFilte|
|00000af0| 72 50 72 6f 63 50 74 72 | 29 30 4c 29 3b 0d 09 0d |rProcPtr|)0L);...|
|00000b00| 09 7d 0d 09 28 76 6f 69 | 64 29 41 45 44 69 73 70 |.}..(voi|d)AEDisp|
|00000b10| 6f 73 65 44 65 73 63 28 | 26 61 6e 41 70 70 6c 65 |oseDesc(|&anApple|
|00000b20| 45 76 65 6e 74 29 3b 0d | 09 43 68 65 63 6b 52 65 |Event);.|.CheckRe|
|00000b30| 73 75 6c 74 28 65 72 72 | 2c 20 22 61 65 5f 64 6f |sult(err|, "ae_do|
|00000b40| 5f 51 75 69 74 22 29 3b | 0d 7d 0d 0d 0d 76 6f 69 |_Quit");|.}...voi|
|00000b50| 64 20 61 65 5f 64 6f 5f | 43 6c 6f 73 65 20 28 29 |d ae_do_|Close ()|
|00000b60| 0d 7b 0d 09 2f 2a 20 43 | 6f 6e 73 74 72 75 63 74 |.{../* C|onstruct|
|00000b70| 20 61 6e 20 41 70 70 6c | 65 20 65 76 65 6e 74 20 | an Appl|e event |
|00000b80| 74 6f 20 63 6c 6f 73 65 | 20 74 68 65 20 66 72 6f |to close| the fro|
|00000b90| 6e 74 6d 6f 73 74 20 77 | 69 6e 64 6f 77 20 2a 2f |ntmost w|indow */|
|00000ba0| 0d 09 2f 2a 20 54 68 65 | 20 64 69 72 65 63 74 20 |../* The| direct |
|00000bb0| 70 61 72 61 6d 65 74 65 | 72 20 69 73 20 61 6e 20 |paramete|r is an |
|00000bc0| 6f 62 6a 65 63 74 20 73 | 70 65 63 69 66 69 65 72 |object s|pecifier|
|00000bd0| 20 66 6f 72 20 74 68 65 | 20 77 69 6e 64 6f 77 20 | for the| window |
|00000be0| 74 6f 20 62 65 20 63 6c | 6f 73 65 64 20 2a 2f 0d |to be cl|osed */.|
|00000bf0| 0d 09 4f 53 45 72 72 09 | 09 09 65 72 72 20 3d 20 |..OSErr.|..err = |
|00000c00| 6e 6f 45 72 72 3b 0d 09 | 41 70 70 6c 65 45 76 65 |noErr;..|AppleEve|
|00000c10| 6e 74 09 09 61 6e 41 70 | 70 6c 65 45 76 65 6e 74 |nt..anAp|pleEvent|
|00000c20| 2c 20 72 65 70 6c 79 41 | 45 3b 0d 09 41 45 44 65 |, replyA|E;..AEDe|
|00000c30| 73 63 09 09 09 6f 62 6a | 53 70 65 63 2c 0d 09 09 |sc...obj|Spec,...|
|00000c40| 09 09 09 6e 75 6c 6c 43 | 6f 6e 74 61 69 6e 65 72 |...nullC|ontainer|
|00000c50| 20 3d 20 7b 27 6e 75 6c | 6c 27 2c 20 30 4c 7d 2c | = {'nul|l', 0L},|
|00000c60| 0d 09 09 09 09 09 6b 65 | 79 44 61 74 61 3b 0d 09 |......ke|yData;..|
|00000c70| 6c 6f 6e 67 09 09 09 69 | 6e 64 65 78 3b 0d 0d 09 |long...i|ndex;...|
|00000c80| 69 66 20 28 46 72 6f 6e | 74 57 69 6e 64 6f 77 28 |if (Fron|tWindow(|
|00000c90| 29 20 3d 3d 20 4e 55 4c | 4c 29 20 72 65 74 75 72 |) == NUL|L) retur|
|00000ca0| 6e 3b 20 09 2f 2a 20 44 | 6f 6e 27 74 20 64 6f 20 |n; ./* D|on't do |
|00000cb0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 69 66 |the foll|owing if|
|00000cc0| 20 6e 6f 20 77 69 6e 64 | 6f 77 73 20 61 72 65 20 | no wind|ows are |
|00000cd0| 6f 70 65 6e 20 2a 2f 0d | 0d 09 65 72 72 20 3d 20 |open */.|..err = |
|00000ce0| 41 45 43 72 65 61 74 65 | 41 70 70 6c 65 45 76 65 |AECreate|AppleEve|
|00000cf0| 6e 74 28 6b 41 45 43 6f | 72 65 53 75 69 74 65 2c |nt(kAECo|reSuite,|
|00000d00| 20 6b 41 45 43 6c 6f 73 | 65 2c 20 26 67 53 65 6c | kAEClos|e, &gSel|
|00000d10| 66 41 64 64 72 65 73 73 | 44 65 73 63 2c 0d 09 09 |fAddress|Desc,...|
|00000d20| 09 09 09 09 09 20 6b 41 | 75 74 6f 47 65 6e 65 72 |..... kA|utoGener|
|00000d30| 61 74 65 52 65 74 75 72 | 6e 49 44 2c 20 6b 41 6e |ateRetur|nID, kAn|
|00000d40| 79 54 72 61 6e 73 61 63 | 74 69 6f 6e 49 44 2c 0d |yTransac|tionID,.|
|00000d50| 09 09 09 09 09 09 09 20 | 26 61 6e 41 70 70 6c 65 |....... |&anApple|
|00000d60| 45 76 65 6e 74 29 3b 0d | 09 69 66 20 28 65 72 72 |Event);.|.if (err|
|00000d70| 20 21 3d 20 6e 6f 45 72 | 72 29 20 67 6f 74 6f 20 | != noEr|r) goto |
|00000d80| 64 6f 6e 65 3b 0d 0d 09 | 2f 2a 20 43 72 65 61 74 |done;...|/* Creat|
|00000d90| 65 20 61 6e 20 6f 62 6a | 65 63 74 20 73 70 65 63 |e an obj|ect spec|
|00000da0| 69 66 69 65 72 20 66 6f | 72 20 74 68 65 20 66 72 |ifier fo|r the fr|
|00000db0| 6f 6e 74 6d 6f 73 74 20 | 77 69 6e 64 6f 77 20 2a |ontmost |window *|
|00000dc0| 2f 0d 09 69 6e 64 65 78 | 20 3d 20 31 3b 20 2f 2a |/..index| = 1; /*|
|00000dd0| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 66 72 6f | This is| the fro|
|00000de0| 6e 74 6d 6f 73 74 20 77 | 69 6e 64 6f 77 20 6f 72 |ntmost w|indow or|
|00000df0| 20 64 6f 63 75 6d 65 6e | 74 20 2a 2f 0d 09 28 76 | documen|t */..(v|
|00000e00| 6f 69 64 29 41 45 43 72 | 65 61 74 65 44 65 73 63 |oid)AECr|eateDesc|
|00000e10| 28 74 79 70 65 4c 6f 6e | 67 49 6e 74 65 67 65 72 |(typeLon|gInteger|
|00000e20| 2c 20 28 50 74 72 29 26 | 69 6e 64 65 78 2c 20 73 |, (Ptr)&|index, s|
|00000e30| 69 7a 65 6f 66 28 69 6e | 64 65 78 29 2c 20 26 6b |izeof(in|dex), &k|
|00000e40| 65 79 44 61 74 61 29 3b | 0d 09 65 72 72 20 3d 20 |eyData);|..err = |
|00000e50| 43 72 65 61 74 65 4f 62 | 6a 53 70 65 63 69 66 69 |CreateOb|jSpecifi|
|00000e60| 65 72 28 63 57 69 6e 64 | 6f 77 2c 20 26 6e 75 6c |er(cWind|ow, &nul|
|00000e70| 6c 43 6f 6e 74 61 69 6e | 65 72 2c 20 66 6f 72 6d |lContain|er, form|
|00000e80| 41 62 73 6f 6c 75 74 65 | 50 6f 73 69 74 69 6f 6e |Absolute|Position|
|00000e90| 2c 20 26 6b 65 79 44 61 | 74 61 2c 20 74 72 75 65 |, &keyDa|ta, true|
|00000ea0| 2c 20 26 6f 62 6a 53 70 | 65 63 29 3b 09 2f 2a 20 |, &objSp|ec);./* |
|00000eb0| 54 68 69 73 20 77 69 6c | 6c 20 64 69 73 70 6f 73 |This wil|l dispos|
|00000ec0| 65 20 6f 66 20 74 68 65 | 20 69 6e 70 75 74 73 20 |e of the| inputs |
|00000ed0| 66 6f 72 20 75 73 20 2a | 2f 0d 09 69 66 20 28 65 |for us *|/..if (e|
|00000ee0| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 20 67 6f 74 |rr != no|Err) got|
|00000ef0| 6f 20 64 6f 6e 65 3b 0d | 09 0d 09 2f 2a 20 50 75 |o done;.|.../* Pu|
|00000f00| 74 20 74 68 69 73 20 6f | 62 6a 65 63 74 20 73 70 |t this o|bject sp|
|00000f10| 65 63 69 66 69 65 72 20 | 69 6e 74 6f 20 74 68 65 |ecifier |into the|
|00000f20| 20 64 69 72 65 63 74 20 | 70 61 72 61 6d 65 74 65 | direct |paramete|
|00000f30| 72 20 2a 2f 0d 09 65 72 | 72 20 3d 20 41 45 50 75 |r */..er|r = AEPu|
|00000f40| 74 50 61 72 61 6d 44 65 | 73 63 20 28 26 61 6e 41 |tParamDe|sc (&anA|
|00000f50| 70 70 6c 65 45 76 65 6e | 74 2c 20 6b 65 79 44 69 |ppleEven|t, keyDi|
|00000f60| 72 65 63 74 4f 62 6a 65 | 63 74 2c 20 26 6f 62 6a |rectObje|ct, &obj|
|00000f70| 53 70 65 63 29 3b 09 2f | 2a 20 54 68 65 20 6f 62 |Spec);./|* The ob|
|00000f80| 6a 65 63 74 20 74 6f 20 | 62 65 20 63 6c 6f 73 65 |ject to |be close|
|00000f90| 64 20 2a 2f 0d 09 28 76 | 6f 69 64 29 41 45 44 69 |d */..(v|oid)AEDi|
|00000fa0| 73 70 6f 73 65 44 65 73 | 63 20 28 26 6f 62 6a 53 |sposeDes|c (&objS|
|00000fb0| 70 65 63 29 3b 0d 09 69 | 66 20 28 65 72 72 20 21 |pec);..i|f (err !|
|00000fc0| 3d 20 6e 6f 45 72 72 29 | 20 67 6f 74 6f 20 64 6f |= noErr)| goto do|
|00000fd0| 6e 65 3b 0d 0d 09 2f 2a | 20 53 65 6e 64 20 74 68 |ne;.../*| Send th|
|00000fe0| 65 20 65 76 65 6e 74 20 | 74 6f 20 6f 75 72 73 65 |e event |to ourse|
|00000ff0| 6c 76 65 73 20 2a 2f 0d | 09 65 72 72 20 3d 20 41 |lves */.|.err = A|
|00001000| 45 53 65 6e 64 20 28 26 | 61 6e 41 70 70 6c 65 45 |ESend (&|anAppleE|
|00001010| 76 65 6e 74 2c 20 26 72 | 65 70 6c 79 41 45 2c 20 |vent, &r|eplyAE, |
|00001020| 6b 41 45 4e 6f 52 65 70 | 6c 79 2c 0d 09 09 09 09 |kAENoRep|ly,.....|
|00001030| 20 20 6b 41 45 4e 6f 72 | 6d 61 6c 50 72 69 6f 72 | kAENor|malPrior|
|00001040| 69 74 79 2c 20 6b 41 45 | 44 65 66 61 75 6c 74 54 |ity, kAE|DefaultT|
|00001050| 69 6d 65 6f 75 74 2c 20 | 28 49 64 6c 65 50 72 6f |imeout, |(IdlePro|
|00001060| 63 50 74 72 29 30 4c 2c | 0d 09 09 09 09 20 20 28 |cPtr)0L,|..... (|
|00001070| 45 76 65 6e 74 46 69 6c | 74 65 72 50 72 6f 63 50 |EventFil|terProcP|
|00001080| 74 72 29 30 4c 29 3b 0d | 09 0d 64 6f 6e 65 3a 0d |tr)0L);.|..done:.|
|00001090| 09 28 76 6f 69 64 29 41 | 45 44 69 73 70 6f 73 65 |.(void)A|EDispose|
|000010a0| 44 65 73 63 28 26 61 6e | 41 70 70 6c 65 45 76 65 |Desc(&an|AppleEve|
|000010b0| 6e 74 29 3b 0d 09 43 68 | 65 63 6b 52 65 73 75 6c |nt);..Ch|eckResul|
|000010c0| 74 28 65 72 72 2c 20 22 | 61 65 5f 64 6f 5f 43 6c |t(err, "|ae_do_Cl|
|000010d0| 6f 73 65 22 29 3b 0d 7d | 0d 0d 76 6f 69 64 20 61 |ose");.}|..void a|
|000010e0| 65 5f 64 6f 5f 4f 70 65 | 6e 20 28 46 53 53 70 65 |e_do_Ope|n (FSSpe|
|000010f0| 63 20 2a 74 68 65 46 69 | 6c 65 53 70 65 63 29 0d |c *theFi|leSpec).|
|00001100| 7b 0d 09 4f 53 45 72 72 | 09 65 72 72 3b 0d 09 41 |{..OSErr|.err;..A|
|00001110| 70 70 6c 65 45 76 65 6e | 74 09 61 6e 41 70 70 6c |ppleEven|t.anAppl|
|00001120| 65 45 76 65 6e 74 2c 20 | 72 65 70 6c 79 41 45 3b |eEvent, |replyAE;|
|00001130| 0d 09 41 45 44 65 73 63 | 09 09 61 6c 69 61 73 44 |..AEDesc|..aliasD|
|00001140| 65 73 63 20 3d 20 7b 74 | 79 70 65 4e 75 6c 6c 2c |esc = {t|ypeNull,|
|00001150| 20 4e 55 4c 4c 7d 3b 0d | 09 0d 09 2f 2a 20 53 65 | NULL};.|.../* Se|
|00001160| 6e 64 20 61 6e 20 22 6f | 70 65 6e 20 64 6f 63 75 |nd an "o|pen docu|
|00001170| 6d 65 6e 74 20 7b 66 69 | 6c 65 2d 61 6c 69 61 73 |ment {fi|le-alias|
|00001180| 7d 22 20 65 76 65 6e 74 | 20 62 61 63 6b 20 74 6f |}" event| back to|
|00001190| 20 74 68 69 73 20 61 70 | 70 6c 69 63 61 74 69 6f | this ap|plicatio|
|000011a0| 6e 20 2a 2f 0d 09 65 72 | 72 20 3d 20 41 45 43 72 |n */..er|r = AECr|
|000011b0| 65 61 74 65 41 70 70 6c | 65 45 76 65 6e 74 28 6b |eateAppl|eEvent(k|
|000011c0| 43 6f 72 65 45 76 65 6e | 74 43 6c 61 73 73 2c 20 |CoreEven|tClass, |
|000011d0| 2f 2a 20 3c 2d 20 4e 6f | 74 65 3a 20 74 68 69 73 |/* <- No|te: this|
|000011e0| 20 69 73 20 77 68 61 74 | 20 41 70 70 6c 65 45 76 | is what| AppleEv|
|000011f0| 65 6e 74 73 2e 68 20 63 | 61 6c 6c 73 20 74 68 65 |ents.h c|alls the|
|00001200| 20 34 72 65 71 75 69 72 | 65 64 20 73 75 69 74 65 | 4requir|ed suite|
|00001210| 20 2a 2f 0d 09 09 09 09 | 09 09 09 20 6b 41 45 4f | */.....|... kAEO|
|00001220| 70 65 6e 44 6f 63 75 6d | 65 6e 74 73 2c 20 26 67 |penDocum|ents, &g|
|00001230| 53 65 6c 66 41 64 64 72 | 65 73 73 44 65 73 63 2c |SelfAddr|essDesc,|
|00001240| 0d 09 09 09 09 09 09 09 | 20 6b 41 75 74 6f 47 65 |........| kAutoGe|
|00001250| 6e 65 72 61 74 65 52 65 | 74 75 72 6e 49 44 2c 20 |nerateRe|turnID, |
|00001260| 6b 41 6e 79 54 72 61 6e | 73 61 63 74 69 6f 6e 49 |kAnyTran|sactionI|
|00001270| 44 2c 0d 09 09 09 09 09 | 09 09 20 26 61 6e 41 70 |D,......|.. &anAp|
|00001280| 70 6c 65 45 76 65 6e 74 | 29 3b 0d 09 69 66 20 28 |pleEvent|);..if (|
|00001290| 65 72 72 20 21 3d 20 6e | 6f 45 72 72 29 20 67 6f |err != n|oErr) go|
|000012a0| 74 6f 20 64 6f 6e 65 3b | 0d 09 2f 2a 20 4d 61 6b |to done;|../* Mak|
|000012b0| 65 20 61 6e 20 61 6c 69 | 61 73 20 66 6f 72 20 74 |e an ali|as for t|
|000012c0| 68 65 20 66 69 6c 65 20 | 2a 2f 0d 09 65 72 72 20 |he file |*/..err |
|000012d0| 3d 20 4e 65 77 41 6c 69 | 61 73 28 4e 55 4c 4c 2c |= NewAli|as(NULL,|
|000012e0| 20 74 68 65 46 69 6c 65 | 53 70 65 63 2c 20 28 41 | theFile|Spec, (A|
|000012f0| 6c 69 61 73 48 61 6e 64 | 6c 65 2a 29 26 61 6c 69 |liasHand|le*)&ali|
|00001300| 61 73 44 65 73 63 2e 64 | 61 74 61 48 61 6e 64 6c |asDesc.d|ataHandl|
|00001310| 65 29 3b 0d 09 69 66 20 | 28 65 72 72 20 21 3d 20 |e);..if |(err != |
|00001320| 6e 6f 45 72 72 29 20 67 | 6f 74 6f 20 64 6f 6e 65 |noErr) g|oto done|
|00001330| 3b 0d 09 61 6c 69 61 73 | 44 65 73 63 2e 64 65 73 |;..alias|Desc.des|
|00001340| 63 72 69 70 74 6f 72 54 | 79 70 65 20 3d 20 74 79 |criptorT|ype = ty|
|00001350| 70 65 41 6c 69 61 73 3b | 0d 09 0d 09 2f 2a 20 41 |peAlias;|..../* A|
|00001360| 64 64 20 69 74 20 74 6f | 20 74 68 65 20 65 76 65 |dd it to| the eve|
|00001370| 6e 74 20 2a 2f 0d 09 65 | 72 72 20 3d 20 41 45 50 |nt */..e|rr = AEP|
|00001380| 75 74 50 61 72 61 6d 44 | 65 73 63 28 26 61 6e 41 |utParamD|esc(&anA|
|00001390| 70 70 6c 65 45 76 65 6e | 74 2c 20 6b 65 79 44 69 |ppleEven|t, keyDi|
|000013a0| 72 65 63 74 4f 62 6a 65 | 63 74 2c 20 26 61 6c 69 |rectObje|ct, &ali|
|000013b0| 61 73 44 65 73 63 29 3b | 09 2f 2a 20 54 68 65 20 |asDesc);|./* The |
|000013c0| 66 69 6c 65 20 74 6f 20 | 62 65 20 6f 70 65 6e 65 |file to |be opene|
|000013d0| 64 20 2a 2f 0d 09 69 66 | 20 28 65 72 72 20 21 3d |d */..if| (err !=|
|000013e0| 20 6e 6f 45 72 72 29 20 | 67 6f 74 6f 20 64 6f 6e | noErr) |goto don|
|000013f0| 65 3b 0d 09 65 72 72 20 | 3d 20 41 45 53 65 6e 64 |e;..err |= AESend|
|00001400| 20 28 26 61 6e 41 70 70 | 6c 65 45 76 65 6e 74 2c | (&anApp|leEvent,|
|00001410| 20 26 72 65 70 6c 79 41 | 45 2c 20 6b 41 45 4e 6f | &replyA|E, kAENo|
|00001420| 52 65 70 6c 79 2c 0d 09 | 09 09 09 20 20 6b 41 45 |Reply,..|... kAE|
|00001430| 4e 6f 72 6d 61 6c 50 72 | 69 6f 72 69 74 79 2c 20 |NormalPr|iority, |
|00001440| 6b 41 45 44 65 66 61 75 | 6c 74 54 69 6d 65 6f 75 |kAEDefau|ltTimeou|
|00001450| 74 2c 20 28 49 64 6c 65 | 50 72 6f 63 50 74 72 29 |t, (Idle|ProcPtr)|
|00001460| 30 4c 2c 0d 09 09 09 09 | 20 20 28 45 76 65 6e 74 |0L,.....| (Event|
|00001470| 46 69 6c 74 65 72 50 72 | 6f 63 50 74 72 29 30 4c |FilterPr|ocPtr)0L|
|00001480| 29 3b 0d 0d 64 6f 6e 65 | 3a 0d 09 69 66 20 28 61 |);..done|:..if (a|
|00001490| 6c 69 61 73 44 65 73 63 | 2e 64 61 74 61 48 61 6e |liasDesc|.dataHan|
|000014a0| 64 6c 65 20 21 3d 20 4e | 55 4c 4c 29 0d 09 09 28 |dle != N|ULL)...(|
|000014b0| 76 6f 69 64 29 20 41 45 | 44 69 73 70 6f 73 65 44 |void) AE|DisposeD|
|000014c0| 65 73 63 28 26 61 6c 69 | 61 73 44 65 73 63 29 3b |esc(&ali|asDesc);|
|000014d0| 0d 09 28 76 6f 69 64 29 | 20 41 45 44 69 73 70 6f |..(void)| AEDispo|
|000014e0| 73 65 44 65 73 63 28 26 | 61 6e 41 70 70 6c 65 45 |seDesc(&|anAppleE|
|000014f0| 76 65 6e 74 29 3b 0d 09 | 43 68 65 63 6b 52 65 73 |vent);..|CheckRes|
|00001500| 75 6c 74 28 65 72 72 2c | 20 22 61 65 5f 64 6f 5f |ult(err,| "ae_do_|
|00001510| 4f 70 65 6e 22 29 3b 0d | 7d 0d 0d 76 6f 69 64 20 |Open");.|}..void |
|00001520| 61 65 5f 64 6f 5f 4e 65 | 77 44 6f 63 75 6d 65 6e |ae_do_Ne|wDocumen|
|00001530| 74 20 28 29 0d 7b 0d 09 | 2f 2a 20 43 6f 64 65 20 |t ().{..|/* Code |
|00001540| 72 65 76 69 73 65 64 20 | 31 2f 32 32 2f 39 32 20 |revised |1/22/92 |
|00001550| 74 6f 20 6d 61 74 63 68 | 20 74 68 65 20 57 69 6e |to match| the Win|
|00001560| 74 65 72 20 27 39 32 20 | 52 65 67 69 73 74 72 79 |ter '92 |Registry|
|00001570| 20 2a 2f 0d 09 41 70 70 | 6c 65 45 76 65 6e 74 09 | */..App|leEvent.|
|00001580| 09 61 6e 41 70 70 6c 65 | 45 76 65 6e 74 20 3d 20 |.anApple|Event = |
|00001590| 7b 74 79 70 65 4e 75 6c | 6c 2c 20 4e 55 4c 4c 7d |{typeNul|l, NULL}|
|000015a0| 2c 20 72 65 70 6c 79 41 | 45 3b 0d 09 41 45 52 65 |, replyA|E;..AERe|
|000015b0| 63 6f 72 64 09 09 73 63 | 72 61 74 63 68 52 65 63 |cord..sc|ratchRec|
|000015c0| 6f 72 64 20 3d 20 7b 74 | 79 70 65 4e 75 6c 6c 2c |ord = {t|ypeNull,|
|000015d0| 20 4e 55 4c 4c 7d 3b 0d | 09 41 45 52 65 63 6f 72 | NULL};.|.AERecor|
|000015e0| 64 09 09 69 6e 73 65 72 | 74 69 6f 6e 4c 6f 63 20 |d..inser|tionLoc |
|000015f0| 3d 20 7b 74 79 70 65 4e | 75 6c 6c 2c 20 4e 55 4c |= {typeN|ull, NUL|
|00001600| 4c 7d 3b 0d 09 41 45 44 | 65 73 63 09 09 09 6e 75 |L};..AED|esc...nu|
|00001610| 6c 6c 44 65 73 63 20 3d | 20 7b 20 74 79 70 65 4e |llDesc =| { typeN|
|00001620| 75 6c 6c 2c 20 4e 55 4c | 4c 20 7d 3b 0d 09 44 65 |ull, NUL|L };..De|
|00001630| 73 63 54 79 70 65 09 09 | 73 63 72 61 74 63 68 54 |scType..|scratchT|
|00001640| 79 70 65 3b 0d 09 4f 53 | 45 72 72 09 09 09 65 72 |ype;..OS|Err...er|
|00001650| 72 20 3d 20 6e 6f 45 72 | 72 3b 0d 0d 09 2f 2a 20 |r = noEr|r;.../* |
|00001660| 53 65 6e 64 20 61 20 22 | 43 72 65 61 74 65 20 45 |Send a "|Create E|
|00001670| 6c 65 6d 65 6e 74 20 7b | 64 6f 63 75 6d 65 6e 74 |lement {|document|
|00001680| 20 66 72 6f 6d 20 6e 75 | 6c 6c 7d 22 20 65 76 65 | from nu|ll}" eve|
|00001690| 6e 74 20 62 61 63 6b 20 | 74 6f 20 74 68 69 73 20 |nt back |to this |
|000016a0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 2a 2f 0d 09 |applicat|ion */..|
|000016b0| 65 72 72 20 3d 20 41 45 | 43 72 65 61 74 65 41 70 |err = AE|CreateAp|
|000016c0| 70 6c 65 45 76 65 6e 74 | 28 6b 41 45 43 6f 72 65 |pleEvent|(kAECore|
|000016d0| 53 75 69 74 65 2c 20 6b | 41 45 43 72 65 61 74 65 |Suite, k|AECreate|
|000016e0| 45 6c 65 6d 65 6e 74 2c | 20 26 67 53 65 6c 66 41 |Element,| &gSelfA|
|000016f0| 64 64 72 65 73 73 44 65 | 73 63 2c 0d 09 09 09 09 |ddressDe|sc,.....|
|00001700| 09 09 09 20 6b 41 75 74 | 6f 47 65 6e 65 72 61 74 |... kAut|oGenerat|
|00001710| 65 52 65 74 75 72 6e 49 | 44 2c 20 6b 41 6e 79 54 |eReturnI|D, kAnyT|
|00001720| 72 61 6e 73 61 63 74 69 | 6f 6e 49 44 2c 0d 09 09 |ransacti|onID,...|
|00001730| 09 09 09 09 09 20 26 61 | 6e 41 70 70 6c 65 45 76 |..... &a|nAppleEv|
|00001740| 65 6e 74 29 3b 0d 09 43 | 68 65 63 6b 52 65 73 75 |ent);..C|heckResu|
|00001750| 6c 74 28 65 72 72 2c 20 | 22 61 65 5f 64 6f 5f 4e |lt(err, |"ae_do_N|
|00001760| 65 77 44 6f 63 75 6d 65 | 6e 74 3a 20 4e 65 77 2c |ewDocume|nt: New,|
|00001770| 20 63 72 65 61 74 69 6e | 67 20 41 70 70 6c 65 20 | creatin|g Apple |
|00001780| 65 76 65 6e 74 22 29 3b | 0d 09 0d 09 2f 2a 20 43 |event");|..../* C|
|00001790| 72 65 61 74 65 20 74 68 | 65 20 74 79 70 65 49 6e |reate th|e typeIn|
|000017a0| 73 65 72 74 69 6f 6e 4c | 6f 63 20 73 70 65 63 69 |sertionL|oc speci|
|000017b0| 66 69 65 72 2c 20 77 68 | 69 63 68 20 63 6f 6e 73 |fier, wh|ich cons|
|000017c0| 69 73 74 73 20 6f 66 20 | 61 6e 20 6f 62 6a 65 63 |ists of |an objec|
|000017d0| 74 20 73 70 65 63 69 66 | 69 65 72 20 61 6e 64 20 |t specif|ier and |
|000017e0| 2a 2f 0d 09 2f 2a 20 61 | 20 70 6f 73 69 74 69 6f |*/../* a| positio|
|000017f0| 6e 20 77 69 74 68 69 6e | 20 74 68 65 20 63 6f 6e |n within| the con|
|00001800| 74 61 69 6e 65 72 20 28 | 22 6e 75 6c 6c 22 2c 20 |tainer (|"null", |
|00001810| 61 6e 64 20 22 61 74 20 | 74 68 65 20 62 65 67 69 |and "at |the begi|
|00001820| 6e 6e 69 6e 67 22 2c 20 | 72 65 73 70 65 63 74 69 |nning", |respecti|
|00001830| 76 65 6c 79 2e 29 09 2a | 2f 0d 09 65 72 72 20 3d |vely.).*|/..err =|
|00001840| 20 41 45 43 72 65 61 74 | 65 4c 69 73 74 28 4e 55 | AECreat|eList(NU|
|00001850| 4c 4c 2c 20 30 2c 20 74 | 72 75 65 20 2f 2a 20 69 |LL, 0, t|rue /* i|
|00001860| 73 52 65 63 6f 72 64 20 | 2a 2f 2c 20 26 73 63 72 |sRecord |*/, &scr|
|00001870| 61 74 63 68 52 65 63 6f | 72 64 29 3b 0d 09 69 66 |atchReco|rd);..if|
|00001880| 20 28 65 72 72 20 21 3d | 20 6e 6f 45 72 72 29 20 | (err !=| noErr) |
|00001890| 67 6f 74 6f 20 64 6f 6e | 65 3b 0d 09 65 72 72 20 |goto don|e;..err |
|000018a0| 3d 20 41 45 50 75 74 50 | 61 72 61 6d 44 65 73 63 |= AEPutP|aramDesc|
|000018b0| 28 26 73 63 72 61 74 63 | 68 52 65 63 6f 72 64 2c |(&scratc|hRecord,|
|000018c0| 20 6b 65 79 41 45 4f 62 | 6a 65 63 74 2c 20 26 6e | keyAEOb|ject, &n|
|000018d0| 75 6c 6c 44 65 73 63 29 | 3b 0d 09 69 66 20 28 65 |ullDesc)|;..if (e|
|000018e0| 72 72 20 21 3d 20 6e 6f | 45 72 72 29 20 67 6f 74 |rr != no|Err) got|
|000018f0| 6f 20 64 6f 6e 65 3b 0d | 09 73 63 72 61 74 63 68 |o done;.|.scratch|
|00001900| 54 79 70 65 20 3d 20 6b | 41 45 42 65 67 69 6e 6e |Type = k|AEBeginn|
|00001910| 69 6e 67 3b 0d 09 65 72 | 72 20 3d 20 41 45 50 75 |ing;..er|r = AEPu|
|00001920| 74 50 61 72 61 6d 50 74 | 72 20 28 26 73 63 72 61 |tParamPt|r (&scra|
|00001930| 74 63 68 52 65 63 6f 72 | 64 2c 20 6b 65 79 41 45 |tchRecor|d, keyAE|
|00001940| 50 6f 73 69 74 69 6f 6e | 2c 20 74 79 70 65 45 6e |Position|, typeEn|
|00001950| 75 6d 65 72 61 74 69 6f | 6e 2c 20 28 50 74 72 29 |umeratio|n, (Ptr)|
|00001960| 26 73 63 72 61 74 63 68 | 54 79 70 65 2c 20 73 69 |&scratch|Type, si|
|00001970| 7a 65 6f 66 28 73 63 72 | 61 74 63 68 54 79 70 65 |zeof(scr|atchType|
|00001980| 29 29 3b 0d 09 69 66 20 | 28 65 72 72 20 21 3d 20 |));..if |(err != |
|00001990| 6e 6f 45 72 72 29 20 67 | 6f 74 6f 20 64 6f 6e 65 |noErr) g|oto done|
|000019a0| 3b 0d 09 65 72 72 20 3d | 20 41 45 43 6f 65 72 63 |;..err =| AECoerc|
|000019b0| 65 44 65 73 63 28 26 73 | 63 72 61 74 63 68 52 65 |eDesc(&s|cratchRe|
|000019c0| 63 6f 72 64 2c 20 74 79 | 70 65 49 6e 73 65 72 74 |cord, ty|peInsert|
|000019d0| 69 6f 6e 4c 6f 63 2c 20 | 26 69 6e 73 65 72 74 69 |ionLoc, |&inserti|
|000019e0| 6f 6e 4c 6f 63 29 3b 0d | 09 69 66 20 28 65 72 72 |onLoc);.|.if (err|
|000019f0| 20 21 3d 20 6e 6f 45 72 | 72 29 20 67 6f 74 6f 20 | != noEr|r) goto |
|00001a00| 64 6f 6e 65 3b 0d 09 0d | 09 2f 2a 20 50 6c 61 63 |done;...|./* Plac|
|00001a10| 65 20 74 68 65 20 49 6e | 73 65 72 74 69 6f 6e 4c |e the In|sertionL|
|00001a20| 6f 63 20 69 6e 74 6f 20 | 74 68 65 20 41 70 70 6c |oc into |the Appl|
|00001a30| 65 20 65 76 65 6e 74 20 | 2a 2f 0d 09 65 72 72 20 |e event |*/..err |
|00001a40| 3d 20 41 45 50 75 74 50 | 61 72 61 6d 44 65 73 63 |= AEPutP|aramDesc|
|00001a50| 28 26 61 6e 41 70 70 6c | 65 45 76 65 6e 74 2c 20 |(&anAppl|eEvent, |
|00001a60| 6b 65 79 41 45 49 6e 73 | 65 72 74 48 65 72 65 2c |keyAEIns|ertHere,|
|00001a70| 20 26 69 6e 73 65 72 74 | 69 6f 6e 4c 6f 63 29 3b | &insert|ionLoc);|
|00001a80| 09 2f 2a 20 57 68 65 72 | 65 20 74 6f 20 70 75 74 |./* Wher|e to put|
|00001a90| 20 74 68 65 20 77 69 6e | 64 6f 77 20 2a 2f 0d 09 | the win|dow */..|
|00001aa0| 69 66 20 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |if (err |!= noErr|
|00001ab0| 29 20 67 6f 74 6f 20 64 | 6f 6e 65 3b 0d 09 0d 09 |) goto d|one;....|
|00001ac0| 73 63 72 61 74 63 68 54 | 79 70 65 20 3d 20 63 44 |scratchT|ype = cD|
|00001ad0| 6f 63 75 6d 65 6e 74 3b | 0d 09 28 76 6f 69 64 29 |ocument;|..(void)|
|00001ae0| 41 45 50 75 74 50 61 72 | 61 6d 50 74 72 28 26 61 |AEPutPar|amPtr(&a|
|00001af0| 6e 41 70 70 6c 65 45 76 | 65 6e 74 2c 20 6b 65 79 |nAppleEv|ent, key|
|00001b00| 41 45 4f 62 6a 65 63 74 | 43 6c 61 73 73 2c 20 74 |AEObject|Class, t|
|00001b10| 79 70 65 54 79 70 65 2c | 20 28 50 74 72 29 26 73 |ypeType,| (Ptr)&s|
|00001b20| 63 72 61 74 63 68 54 79 | 70 65 2c 20 73 69 7a 65 |cratchTy|pe, size|
|00001b30| 6f 66 28 73 63 72 61 74 | 63 68 54 79 70 65 29 29 |of(scrat|chType))|
|00001b40| 3b 09 2f 2a 20 63 57 69 | 6e 64 6f 77 20 2a 2f 0d |;./* cWi|ndow */.|
|00001b50| 0d 09 65 72 72 20 3d 20 | 41 45 53 65 6e 64 20 28 |..err = |AESend (|
|00001b60| 26 61 6e 41 70 70 6c 65 | 45 76 65 6e 74 2c 20 26 |&anApple|Event, &|
|00001b70| 72 65 70 6c 79 41 45 2c | 20 6b 41 45 4e 6f 52 65 |replyAE,| kAENoRe|
|00001b80| 70 6c 79 2c 0d 09 09 09 | 09 20 20 6b 41 45 4e 6f |ply,....|. kAENo|
|00001b90| 72 6d 61 6c 50 72 69 6f | 72 69 74 79 2c 20 6b 41 |rmalPrio|rity, kA|
|00001ba0| 45 44 65 66 61 75 6c 74 | 54 69 6d 65 6f 75 74 2c |EDefault|Timeout,|
|00001bb0| 20 28 49 64 6c 65 50 72 | 6f 63 50 74 72 29 30 4c | (IdlePr|ocPtr)0L|
|00001bc0| 2c 0d 09 09 09 09 20 20 | 28 45 76 65 6e 74 46 69 |,..... |(EventFi|
|00001bd0| 6c 74 65 72 50 72 6f 63 | 50 74 72 29 30 4c 29 3b |lterProc|Ptr)0L);|
|00001be0| 0d 0d 64 6f 6e 65 3a 0d | 09 69 66 20 28 73 63 72 |..done:.|.if (scr|
|00001bf0| 61 74 63 68 52 65 63 6f | 72 64 2e 64 61 74 61 48 |atchReco|rd.dataH|
|00001c00| 61 6e 64 6c 65 20 21 3d | 20 4e 55 4c 4c 29 0d 09 |andle !=| NULL)..|
|00001c10| 09 28 76 6f 69 64 29 41 | 45 44 69 73 70 6f 73 65 |.(void)A|EDispose|
|00001c20| 44 65 73 63 28 26 73 63 | 72 61 74 63 68 52 65 63 |Desc(&sc|ratchRec|
|00001c30| 6f 72 64 29 3b 0d 09 69 | 66 20 28 69 6e 73 65 72 |ord);..i|f (inser|
|00001c40| 74 69 6f 6e 4c 6f 63 2e | 64 61 74 61 48 61 6e 64 |tionLoc.|dataHand|
|00001c50| 6c 65 20 21 3d 20 4e 55 | 4c 4c 29 0d 09 09 28 76 |le != NU|LL)...(v|
|00001c60| 6f 69 64 29 41 45 44 69 | 73 70 6f 73 65 44 65 73 |oid)AEDi|sposeDes|
|00001c70| 63 28 26 69 6e 73 65 72 | 74 69 6f 6e 4c 6f 63 29 |c(&inser|tionLoc)|
|00001c80| 3b 0d 09 69 66 20 28 69 | 6e 73 65 72 74 69 6f 6e |;..if (i|nsertion|
|00001c90| 4c 6f 63 2e 64 61 74 61 | 48 61 6e 64 6c 65 20 21 |Loc.data|Handle !|
|00001ca0| 3d 20 4e 55 4c 4c 29 0d | 09 09 28 76 6f 69 64 29 |= NULL).|..(void)|
|00001cb0| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 61 |AEDispos|eDesc(&a|
|00001cc0| 6e 41 70 70 6c 65 45 76 | 65 6e 74 29 3b 0d 0d 09 |nAppleEv|ent);...|
|00001cd0| 43 68 65 63 6b 52 65 73 | 75 6c 74 28 65 72 72 2c |CheckRes|ult(err,|
|00001ce0| 20 22 61 65 5f 64 6f 5f | 4e 65 77 44 6f 63 75 6d | "ae_do_|NewDocum|
|00001cf0| 65 6e 74 22 29 3b 0d 7d | 0d 0d 00 00 00 00 00 00 |ent");.}|........|
|00001d00| 00 00 01 00 00 00 01 86 | 00 00 00 86 00 00 00 32 |........|.......2|
|00001d10| 00 00 44 15 08 53 6e 61 | 70 73 68 6f 74 00 00 00 |..D..Sna|pshot...|
|00001d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d30| 07 4d 65 6e 75 73 2e 63 | 02 00 00 00 54 45 58 54 |.Menus.c|....TEXT|
|00001d40| 4b 41 48 4c 01 00 00 62 | 01 09 00 00 00 00 14 4f |KAHL...b|.......O|
|00001d50| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 62 01 09 |..TEXTKA|HL...b..|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 a5 19 0a 49 00 00 | 1c 7a 00 00 01 b8 00 00 |.....I..|.z......|
|00001d80| 00 00 00 00 00 00 00 00 | 00 00 00 d3 25 00 00 00 |........|....%...|
|00001d90| 44 b2 0c 41 45 52 65 67 | 69 73 74 72 79 2e 68 00 |D..AEReg|istry.h.|
|00001da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001db0| 00 00 00 00 00 d3 25 00 | 00 00 44 b2 0c 41 45 52 |......%.|..D..AER|
|00001dc0| 65 67 69 73 74 72 79 2e | 68 00 00 00 00 00 00 00 |egistry.|h.......|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 d3 |........|........|
|00001de0| 25 00 00 00 44 b2 0c 41 | 45 52 65 67 69 73 74 72 |%...D..A|ERegistr|
|00001df0| 79 2e 68 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |y.h.....|........|
|00001e00| 00 00 00 82 00 06 00 00 | 02 8d 00 00 02 98 0b 41 |........|.......A|
|00001e10| 64 6a 75 73 74 4d 65 6e | 75 73 00 00 06 bf 00 00 |djustMen|us......|
|00001e20| 06 c7 09 44 69 73 70 61 | 74 63 68 00 00 00 03 d7 |...Dispa|tch.....|
|00001e30| 00 00 03 e2 0b 44 6f 41 | 70 70 6c 65 43 6d 64 73 |.....DoA|ppleCmds|
|00001e40| 00 00 04 e9 00 00 04 f3 | 0b 44 6f 46 69 6c 65 43 |........|.DoFileC|
|00001e50| 6d 64 73 00 00 00 01 67 | 00 00 01 79 13 45 6e 61 |mds....g|...y.Ena|
|00001e60| 62 6c 65 46 69 6c 65 43 | 6f 6d 6d 61 6e 64 73 00 |bleFileC|ommands.|
|00001e70| 00 00 00 b0 00 00 00 bd | 0d 53 65 74 49 74 65 6d |........|.SetItem|
|00001e80| 45 6e 61 62 6c 65 00 00 | 01 00 00 00 01 86 00 00 |Enable..|........|
|00001e90| 00 86 00 00 00 32 01 06 | f5 00 06 fc 00 00 00 1c |.....2..|........|
|00001ea0| 00 32 00 00 4d 50 53 52 | 00 00 00 0a 03 ef ff ff |.2..MPSR|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+